function getBullet(type) {
	if(type != undefined) {
		console.log("here");
		document.getElementById("controls").innerHTML = '<button id="back" onclick="getBullet()">Back</button>';
		document.getElementById("controls").style.display = "block";
	}
	else{
		document.getElementById("controls").style.display = "none";
	}
	console.log(type);

	for(var i = 0; i < data.items.length; i++) {
		if(data.items[i].label != undefined && type == data.items[i].label) {
			var id = data.items[i].responsible;
		}
	}
	var project = getDescription(id);
	console.log(id);
	if(id != undefined) {
		document.getElementById("description").innerHTML = project;
		document.getElementById("description").style.display = "block";
		return;
	}

	switch(type) {
		case 'Embedded Systems':
			var obj = "./json/bulletEmb.json";
			var posx = 600;
			break;
		case 'Distributed Systems':
			var obj = "./json/bulletDist.json";
			var posx = 600;
			break;
		case 'Information Systems':
			var obj = "./json/bulletInfor.json";
			var posx = 600;
			break;
		case 'Computational Science':
			var obj = "./json/bulletComp.json";
			var posx = 600;
			break;
		case 'Intelligent Systems':
			var obj = "./json/bulletInte.json";
			var posx = 600;
			break;
		case 'Software Engineering':
			var obj = "./json/bulletSoftw.json";
			var posx = 600;
			break;
		case 'Theoretical Computer Science':
			var obj = "./json/bulletTheo.json";
			var posx = 600;
			break;
		default:
			var posx = 200;
			var obj = "./json/bulletGeneral.json"
	}

	startNav();
	changeActive("bullet");
	document.getElementById("chart").innerHTML = ""
	document.getElementById("subControls").style.display = "none";
	document.getElementById("durationButton").style.display = "none";
	document.getElementById("description").style.display = "none";
	document.getElementById("sunburstButtons").style.display = "none";
	document.getElementById("legend").style.display = "none";

	var w = 1300, h = 45, m = [5, 100, 20, posx];
	// top right bottom left

	var chart = d3.chart.bullet().width(w - m[1] - m[3]).height(h - m[0] - m[2]);

	d3.json(obj, function(data) {

		var vis = d3.select("#chart").selectAll("svg").data(data).enter().append("svg").attr("class", "bullet").attr("width", w).attr("height", h).append("g").attr("transform", "translate(" + m[3] + "," + m[0] + ")").call(chart).on("click", function(g) {
			getBullet(g.title);
			console.log(g.title);
		});
		var title = vis.append("g").attr("text-anchor", "end").attr("transform", "translate(-4," + (h - m[0] - m[2]) / 2 + ")");

		title.append("text").attr("class", "title").text(function(d) {
			return d.title;
		});

		title.append("text").attr("class", "subtitle").attr("dy", "1em").text(function(d) {
			return d.subtitle;
		});

		chart.duration(1500);
		window.transition = function() {
			vis.map(randomize).call(chart);
		};
	});
	function randomize(d) {
		if(!d.randomizer)
			d.randomizer = randomizer(d);
		d.ranges = d.ranges.map(d.randomizer);
		d.markers = d.markers.map(d.randomizer);
		d.measures = d.measures.map(d.randomizer);
		return d;
	}

	function randomizer(d) {
		var k = d3.max(d.ranges) * .2;
		return function(d) {
			return Math.max(0, d + k * (Math.random() - .5));
		};
	}

}